/**
 * Purpose	字符串的长度
*  Return	string
*/
String.prototype.getStrLength = function(){
	var length = 0;
	if (this.length === 0) {
		return 0;
	}
	for (var i = 0; i < this.length; i++) {
		if (this.charCodeAt(i) < 255) {
			length += 1;
		} else {
			length += 2;
		}
	}
	return length;
}

/**
*	Purpose	去除一个字符串的前后空格
*	Return		string
*/
String.prototype.trim = function() {
	return this.replace(/(^\s*)|(\s*$)/g , '') ;
}